projects
/
project
/
bcm63xx
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
aff32df
)
mmc: sdhci: only flush cache for data command
author
Kevin Liu
<
[email protected]
>
Wed, 8 Mar 2017 07:16:44 +0000
(15:16 +0800)
committer
Stefan Roese
<
[email protected]
>
Wed, 29 Mar 2017 05:38:06 +0000
(07:38 +0200)
No need to flush cache for command without data.
Signed-off-by: Kevin Liu <
[email protected]
>
drivers/mmc/sdhci.c
patch
|
blob
|
history
diff --git
a/drivers/mmc/sdhci.c
b/drivers/mmc/sdhci.c
index 93cefd89cd4bd96bfd0f3bafaca43c34d5be494f..c94d58db65c70ee8b32cd64e79ebd1b8f44dc262 100644
(file)
--- a/
drivers/mmc/sdhci.c
+++ b/
drivers/mmc/sdhci.c
@@
-242,8
+242,10
@@
static int sdhci_send_command(struct mmc *mmc, struct mmc_cmd *cmd,
sdhci_writel(host, cmd->cmdarg, SDHCI_ARGUMENT);
#ifdef CONFIG_MMC_SDHCI_SDMA
- trans_bytes = ALIGN(trans_bytes, CONFIG_SYS_CACHELINE_SIZE);
- flush_cache(start_addr, trans_bytes);
+ if (data != 0) {
+ trans_bytes = ALIGN(trans_bytes, CONFIG_SYS_CACHELINE_SIZE);
+ flush_cache(start_addr, trans_bytes);
+ }
#endif
sdhci_writew(host, SDHCI_MAKE_CMD(cmd->cmdidx, flags), SDHCI_COMMAND);
start = get_timer(0);